<?php
require("../../class2.php");
require("library/api.php");

$orderID = $tp->toDB($_REQUEST["orderID"]);
$status = $tp->toDB($_REQUEST["STATUS"]);
$notify_email =  $shop_settings["order_email"]; //email address to which debug emails are sent to

switch ($status) {
    case '0':
        $error_message = "Incompleet of niet gelukt";
        break;
    case '1':
        $error_message = "Geannuleerd";
        break;
    case '2':
        $error_message = "Authorizatie geweigerd";
        break;
    default:
        $error_message = "Fout Opgetreden";
}

mail($notify_email, "BETALING GEWEIGERD", "De betaling van Order $orderID is gewijgerd.\r\n\r\nStatus: "
    .$status."\r\nErrormelding: ".$errormsg);
